package com.ctgu.蓝桥杯真题.B组2019;

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

/**
 * @author: Backdiy
 * @data: 2021/4/10 17:08
 * @desc: 如果负号多于负数个数，就减去最小的非负数，否则就是所有数绝对值的和
 */
public class I后缀表达式 {
    public static void main(String[] args) throws IOException {
        int n = Input.nextInt();
        int m = Input.nextInt();
        int len = n + m + 1;
        long sum = 0, min = Integer.MAX_VALUE, cnt = 0;
        ArrayList<Long> a = new ArrayList<>();
        for (int i = 0; i < len; i++) {
            long x = Input.nextLong();
            a.add(x);
            if (x >= 0 && x < min) {
                min = x;
            }
            if (x < 0) {
                cnt++;
            }
            sum += Math.abs(x);
        }
        if (cnt < m) {
            sum -= 2 * min;
        }
        Input.out.println(sum);
        Input.out.flush();
    }

    static class Input {
        static StreamTokenizer streamTokenizer = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        static PrintWriter out = new PrintWriter((new OutputStreamWriter(System.out)));
        static BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

        static int nextInt() throws IOException {
            streamTokenizer.nextToken();
            return (int) streamTokenizer.nval;
        }

        static long nextLong() throws IOException {
            streamTokenizer.nextToken();
            return (long) streamTokenizer.nval;
        }

        static double nextDouble() throws IOException {
            streamTokenizer.nextToken();
            return streamTokenizer.nval;
        }

        static String nextLine() throws IOException {
            return bufferedReader.readLine();
        }

        static char next() throws IOException {
            return (char) bufferedReader.read();
        }
    }
}
